package com.ugoodtech.mdcc.core.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ugoodtech.mdcc.core.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;

@ApiModel("获取报告操作记录")
@Entity
@Table(name = "service_report_recorder")
public class ServiceReportRecorder extends BaseEntity {
    @ApiModelProperty("处理状态")
    private String type = Constants.REPORT_PLAN;
    @ApiModelProperty("说明")
    private String note;
    @ApiModelProperty("对应的报告")
    private StationReport stationReport;
    @ApiModelProperty("对应的部门")
    private Department department;
    @ApiModelProperty("对应的用户")
    private User user;
    @ApiModelProperty("需要跟进的部门")
    private String needFollowDepartment;
    @ApiModelProperty("管理员的备注")
    private String manageNote = "";


    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Column(name = "note")
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @JsonIgnore
    @ManyToOne
    @JoinColumn(name = "report_id")
    public StationReport getStationReport() {
        return stationReport;
    }

    public void setStationReport(StationReport stationReport) {
        this.stationReport = stationReport;
    }

    @JsonIgnore
    @ManyToOne
    @JoinColumn(name = "deparment_id")
    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    @JsonIgnore
    @ManyToOne
    @JoinColumn(name = "user_id")
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Column(name = "need_department")
    public String getNeedFollowDepartment() {
        return needFollowDepartment;
    }

    public void setNeedFollowDepartment(String needFollowDepartment) {
        this.needFollowDepartment = needFollowDepartment;
    }

    @Column(name = "manage_note")
    public String getManageNote() {
        return manageNote;
    }

    public void setManageNote(String manageNote) {
        this.manageNote = manageNote;
    }
}
